
#include <dev.h>
#include "i2c.h"

/* ------------------------------------------------------------------------- */

static i2c_dev_t mcu_dev;

static size_t fastcall mcu_read(uint8 cmd, void *data, size_t size);
static size_t fastcall mcu_write(uint8 cmd, const void *data, size_t size);

/* ------------------------------------------------------------------------- */

i2c_dev_t *get_mcu_device(void)
{
	memset(&mcu_dev, 0, sizeof(mcu_dev));

#ifndef NDEBUG
	strcpy(mcu_dev.name, "MCU");
#endif

	mcu_dev.read = &mcu_read;
	mcu_dev.write = &mcu_write;

	return &mcu_dev;
}

/* ------------------------------------------------------------------------- */

static size_t fastcall mcu_read(uint8 cmd, void *data, size_t size)
{
	return size;
}

static size_t fastcall mcu_write(uint8 cmd, const void *data, size_t size)
{
	return size;
}

/* ------------------------------------------------------------------------- */
